public class Frog implements IAnimal {
    private String name;

    public Frog () {
	this ("");
    }

    public Frog (String name) {
	this.name = name;
    }

    public boolean couldEat (IAnimal obj) {
	if (obj instanceof Dog || obj instanceof Cat) {
	    return true;
	} else {
	    return false;
	}
    }

    public String getName () {
	return this.name;
    }

    public String getType (boolean definiteArticle) {
	if (definiteArticle) {
	    return "жабата";
	} else {
	    return "жаба";
	}
    }

    public void talk () {
	System.out.println (Main.uppercaseFirst (this.getType (true))
			    + name + ", казва \"Квак!\"");
    }
}
